System and method for facilitating data-driven intelligent network

ABSTRACT

Data-driven intelligent networking systems and methods are provided. The system can accommodate dynamic traffic with fast, effective congestion control. The system can maintain state information of individual packet flows, which can be set up or released dynamically based on injected data. Each flow can be provided with a flow-specific input queue upon arriving at a switch. Packets of a respective flow can be acknowledged after reaching the egress point of the network, and the acknowledgement packets can be sent back to the ingress point of the flow along the same data path. As a result, each switch can obtain state information of each flow and perform flow control on a per-flow basis.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a 371 National Stage Entry of, and claims thepriority benefit of PCT Application No. PCT/US2020/024259 filed on Mar.23, 2020, which claims priority to U.S. Patent Application No.62/852,203 filed on May 23, 2019, U.S. Patent Application No. 62/852,273filed on May 23, 2019, and U.S. Patent Application No. 62/852,289 filedon May 23, 2019, the contents of each of which are incorporated hereinby reference in their entirety.

BACKGROUND Field

This is generally related to the technical field of networking. Morespecifically, this disclosure is related to systems and methods forfacilitating scalable, data-driven intelligent networks with congestioncontrol.

Related Art

As network-enabled devices and applications become progressively moreubiquitous, various types of traffic as well as the ever-increasingnetwork load continue to demand more performance from the underlyingnetwork architecture. For example, applications such as high-performancecomputing (HPC), media streaming, and Internet of Things (IOT) cangenerate different types of traffic with distinctive characteristics. Asa result, in addition to conventional network performance metrics suchas bandwidth and delay, network architects continue to face challengessuch as scalability, versatility, and efficiency.

SUMMARY

A data-driven intelligent networking system is provided. The system canaccommodate dynamic traffic with fast, effective congestion control. Thesystem can maintain state information of individual packet flows, whichcan be set up or released dynamically based on injected data. Each flowcan be provided with a flow-specific input queue upon arriving at aswitch. Packets of a respective flow are acknowledged after reaching theegress point of the network, and the acknowledgement packets are sentback to the ingress point of the flow along the same data path. As aresult, each switch can obtain state information of each flow andperform flow control on a per-flow basis.

BRIEF DESCRIPTION OF THE FIGURES

FIG. 1 shows an exemplary network that facilitates flow channels.

FIG. 2A shows an exemplary switch that facilitates flow channels.

FIG. 2B shows an example of how switches along a data path can maintainflow state information.

FIG. 3A shows an exemplary fabric header for a data packet.

FIG. 3B shows an exemplary acknowledgement (ACK) packet format.

FIG. 3C shows the relationship between different variables used toderive and maintain state information of a flow.

FIG. 4A shows an example of how flow channel tables can be used todeliver a flow.

FIG. 4B shows an example of an edge flow channel table (EFCT).

FIG. 4C shows an example of an input flow channel table (IFCT).

FIG. 4D shows an example of an output flow channel table (OFCT).

FIG. 5 shows an example where an unfair share of link bandwidth canoccur in a network.

FIG. 6 shows an example of endpoint congestion.

FIG. 7A shows a flow chart of an exemplary process of generating anexplicit endpoint-congestion-notification ACK.

FIG. 7B shows an exemplary endpoint congestion management logic block.

FIG. 8 shows a flow chart showing of exemplary process of generating anACK in response to a packet being dequeued from an output buffer.

FIG. 9A shows a flow chart of an exemplary fine grain flow control(FGFC) process.

FIG. 9B shows an example of a FGFC-enabled network interface controller.

FIG. 10 shows an example of fabric link congestion.

FIG. 11 shows a flow chart of an example process of applyingcredit-based flow control on a congested fabric link.

FIG. 12 shows an exemplary edge switching system that facilitates flowchannels.

FIG. 13 shows an exemplary intermediary switching system thatfacilitates flow channels.

In the figures, like reference numerals refer to the same figureelements.

DETAILED DESCRIPTION

Various modifications to the disclosed embodiments will be readilyapparent to those skilled in the art, and the general principles definedherein may be applied to other embodiments and applications withoutdeparting from the spirit and scope of the present disclosure. Thus, thepresent invention is not limited to the embodiments shown.

Overview

The present disclosure describes systems and methods that accommodatedynamic data traffic with fast, effective congestion control bymaintaining state information of individual packet streams. Morespecifically, packets injected into a network of switches can becategorized into streams, which can be mapped to their layer-2, layer-3,or other protocol-specific header information. Each stream can be markedby a distinctive identifier that is local to an input port of a switch,and provided with a stream-specific input buffer, so that each streamcan be individually flow-controlled. In addition, packets of arespective stream can be acknowledged upon reaching the egress point ofthe network, and the acknowledgement packets can be sent back to theingress point of the stream along the same data path in the reversedirection. As a result, each switch can obtain state information ofactive packet streams it is forwarding, and can perform highlyresponsive, stream-specific flow control. Such flow control can allowthe network to operate at higher capacity while providing versatiletraffic-engineering capabilities.

In this disclosure, packet streams can also be referred to as “packetflows,” or simply “flows.” The data path traversed by a flow, togetherwith its configuration information maintained by switches, can bereferred to as a “flow channel.” Furthermore, the terms “buffer” and“queue” are used interchangeably in this disclosure.

FIG. 1 shows an exemplary network that facilitates flow channels. Inthis example, a network 100 of switches, which can also be referred toas a “switch fabric,” can include switches 102, 104, 106, 108, and 110.Each switch can have a unique address or ID within switch fabric 100.Various types of devices and networks can be coupled to a switch fabric.For example, a storage array 112 can be coupled to switch fabric 100 viaswitch 110; an InfiniBand (IB) based HPC network 114 can be coupled toswitch fabric 100 via switch 108; a number of end hosts, such as host116, can be coupled to switch fabric 100 via switch 104; and anIP/Ethernet network 118 can be coupled to switch fabric 100 via switch102. In general, a switch can have edge ports and fabric ports. An edgeport can couple to a device that is external to the fabric. A fabricport can couple to another switch within the fabric via a fabric link.

Typically, traffic can be injected into switch fabric 100 via an ingressport of an edge switch, and leave switch fabric 100 via an egress portof another (or the same) edge switch. An ingress edge switch can groupinjected data packets into flows, which can be identified by flow ID's.The concept of a flow is not limited to a particular protocol or layer(such as layer-2 or layer-3 in the Open System Interface (OSI) referencemodel). For example, a flow can be mapped to traffic with a particularsource Ethernet address, traffic between a source IP address anddestination IP address, traffic corresponding to a TCP or UDP port/IP5-tuple (source and destination IP addresses, source and destination TCPor UDP port numbers, and IP protocol number), or traffic produced by aprocess or thread running on an end host. In other words, a flow can beconfigured to map to data between any physical or logic entities. Theconfiguration of this mapping can be done remotely or locally at theingress edge switch.

Upon receiving injected data packets, the ingress edge switch can assigna flow ID to the flow. This flow ID can be included in a special header,which the ingress edge switch can use to encapsulate the injectedpackets. Furthermore, the ingress edge switch can also inspect theoriginal header fields of an injected packet to determine theappropriate egress edge switch's address, and include this address as adestination address in the encapsulation header. Note that the flow IDcan be a locally significant value specific to a link, and this valuecan be unique only to a particular input port on a switch. When thepacket is forwarded to the next-hop switch, the packet enters anotherlink, and the flow-ID can be updated accordingly. As the packets of aflow traverses multiple links and switches, the flow IDs correspondingto this flow can form a unique chain. That is, at every switch, before apacket leaves the switch, the packet's flow ID can be updated to a flowID used by the outgoing link. This up-stream-to-down-stream one-to-onemapping between flow ID's can begin at the ingress edge switch and endat the egress edge switch. Because the flow ID's only need to be uniquewithin an incoming link, a switch can accommodate a large number offlows. For example, if a flow ID is 11 bits long, an input port cansupport up to 2048 flows. Furthermore, the match pattern (one or moreheader fields of a packet) used to map to a flow can include a greaternumber of bits. For instance, a 32-bit long match pattern, which caninclude multiple fields in a packet header, can map up 2{circumflex over( )}=different header field patterns. If a fabric has N ingress edgeports, a total number of N*2{circumflex over ( )}32 identifiable flowscan be supported.

A switch can assign every flow a separate, dedicated input queue. Thisconfiguration allows the switch to monitor and manage the level ofcongestion of individual flows, and prevent head-of-queue blocking whichcould occur if shared buffer were used for multiple flows. When a packetis delivered to the destination egress switch, the egress switch cangenerate and send back an acknowledgement (ACK) in the upstreamdirection along the same data path to the ingress edge switch. As thisACK packet traverses the same data path, the switches along the path canobtain the state information associated with the delivery of thecorresponding flow by monitoring the amount of outstanding,unacknowledged data. This state information can then be used to performflow-specific traffic management to ensure the health of the entirenetwork and fair treatment of the flows. As explained in more detailbelow, this per-flow queuing, combined with flow-specific deliveryacknowledgements, can allow the switch fabric to implement effective,fast, and accurate congestion control. In turn, the switch fabric candeliver traffic with significantly improved network utilization withoutsuffering from congestion.

Flows can be set up and released dynamically, or “on the fly,” based ondemand. Specifically, a flow can be set up (e.g., the flow-ID to packetheader mapping is established) by an ingress edge switch when a datapacket arrives at the switch and no flow ID has been previously assignedto this packet. As this packet travels through the network, flow IDs canbe assigned along every switch the packet traverses, and a chain of flowIDs can be established from ingress to egress. Subsequent packetsbelonging to the same flow can use the same flow IDs along the datapath. When packets are delivered to the destination egress switch andACK packets are received by the switches along the data path, eachswitch can update its state information with respect to the amount ofoutstanding, unacknowledged data for this flow. When a switch's inputqueue for this flow is empty and there is no more unacknowledged data,the switch can release the flow ID (i.e., release this flow channel) andre-use the flow-ID for other flows. This data-driven dynamic flow setupand teardown mechanism can obviate the need for centralized flowmanagement, and allows the network to respond quickly to traffic patternchanges.

Note that the network architecture described herein is different fromsoftware-defined networks (SDN's), which typically uses the OpenFlowprotocol. In SDN, switches are configured by a central networkcontroller, and packets are forwarded based one or more fields in thelayer-2 (data link layer, such as Ethernet), layer-3 (network layer,such as IP), or layer-4 (transport layer, such as TCP or UDP) headers.In SDN such header-field lookup is performed at every switch in thenetwork, and there is no fast flow ID-based forwarding as is done in thenetworks described herein. Furthermore, because the OpenFlowheader-field lookup is done using ternary content-addressable memory(TCAM), the cost of such lookups can be high. Also, because theheader-field mapping configuration is done by the central controller,the setup and tear-down of each mapping relationship is relatively slowand could require a fair amount of control traffic. As a result, an SDNnetwork's response to various network situations, such as congestion,can be slow. In contrast, in the network described herein, the flows canbe set up and torn down dynamically based on traffic demand; and packetscan be forwarded by a fixed-length flow ID. In other words, flowchannels can be data driven and managed (i.e., set up, monitored, andtorn down) in a distributed manner, without the intervention of acentral controller. Furthermore, the flow ID-based forwarding can reducethe amount of TCAM space used and as a result a much greater number offlows can be accommodated.

Referring to the example shown in FIG. 1 , suppose that storage array112 is to send data using TCP/IP to host 116. During operation, storagearray 112 can send the first packet with host 116's IP address as thedestination address and a predetermined TCP port specified in the TCPheader. When this packet reaches switch 110, the packet processor at theinput port of switch 110 can identify a TCP/IP 5-tuple of this packet.The packet processor of switch 110 can also determine that this 5-tuplecurrently is not mapped to any flow ID, and can allocate a new flow IDto this 5-tuple. Furthermore, switch 110 can determine the egressswitch, which is switch 104, for this packet based on the destination(i.e., host 116's) IP address (assuming switch 110 has knowledge thathost 116 is coupled to switch 104). Subsequently, switch 110 canencapsulate the received packet with a fabric header that indicates thenewly assigned flow ID and switch 104's fabric address. Switch 110 canthen schedule the encapsulated packet to be forwarded toward switch 104based on a fabric forwarding table, which can be computed by all theswitches in fabric 100 using a routing algorithm such as link state ordistance vector.

Note that the operations described above can be performed substantiallyat line speed with little buffering and delay when the first packet isreceived. After the first packet is processed and scheduled fortransmission, subsequent packets from the same flow can be processed byswitch 110 even faster because the same flow ID is used. In addition,the design of the flow channels can be such that the allocation,matching, and deallocation of flow channels can have substantially thesame cost. For example, a conditional allocation of a flow channel basedon a lookup match and a separate, independent deallocation of anotherflow channel can be performed concurrently in nearly every clock cycle.This means that generating and controlling the flow channels can addnearly no additional overhead to the regular forwarding of packets. Thecongestion control mechanism, on the other hand, can improve theperformance of some applications by more than three orders of magnitude.

At each switch along the data path (which includes switches 110, 106,and 104), a dedicated input buffer can be provided for this flow, andthe amount of transmitted but unacknowledged data can be tracked. Whenthe first packet reaches switch 104, switch 104 can determine that thedestination fabric address in the packet's fabric header matches its ownaddress. In response, switch 104 can decapsulate the packet from thefabric header, and forward the decapsulated packet to host 116.Furthermore, switch 104 can generate an ACK packet and send this ACKpacket back to switch 110. As this ACK packet traverses the same datapath, switches 106 and 110 can each update their own state informationfor the unacknowledged data for this flow.

In general, congestion within a network can cause the network buffers tofill. When a network buffer is full, the traffic trying to pass throughthe buffer ideally should be slowed down or stopped. Otherwise, thebuffer could overflow and packets could be dropped. In conventionalnetworks, congestion control is typically done end-to-end at the edge.The core of the network is assumed to function only as “dumb pipes,” themain purpose of which is to forward traffic. Such network design oftensuffers from slow responses to congestions, because congestioninformation often cannot be sent to the edge devices quickly, and theresulting action taken by the edge devices cannot always be effective inremoving the congestion. This slow response in turn limits theutilization of the network, because to keep the network free ofcongestion the network operator often needs to limit the total amount oftraffic injected into the network. Furthermore, end-to-end congestioncontrol usually is only effective provided that the network is notalready congested. Once the network is heavily congested, end-to-endcongestion control would not work, because the congestion notificationmessages can be congested themselves (unless a separate control-planenetwork that is different from the data-plane network is used forsending congestion control messages).

In contrast, the flow channels can prevent such congestion from growingwithin the switch fabric. The flow channel mechanism can recognize whena flow is experiencing some degree of congestion, and in response canslow down or stop new packets of the same flow from entering the fabric.In turn, these new packets can be buffered in a flow channel queue onthe edge port and are only allowed into the fabric when packets for thesame flow leave the fabric at the destination edge port. This processcan limit the total buffering requirements of this flow within thefabric to an amount that would not cause the fabric buffers to becometoo full.

With flow channels, the switches have a reasonably accurate stateinformation on the amount of outstanding in-transit data within thefabric. This state information can be aggregated for all the flows on aningress edge port. This means that the total amount of data injected byan ingress edge port can be known. Consequently, the flow channelmechanism can set a limit on the total amount of data in the fabric.When all edge ports apply this limit action, the total amount of packetdata in the entire fabric can be well controlled, which in turn canprevent the entire fabric from being saturated. The flow channels canalso slow the progress of an individual congested flow within the fabricwithout slowing down other flows. This feature can keep packets awayfrom a congestion hot spot while preventing buffers from becoming fulland ensuring free buffer space for unrelated traffic.

Operation of Flow Channel

In general, flow channels can define a path for each communicationsession across the switch fabric. The path and amount of data belongingto each flow can be described in a set of dynamically connecting flowtables associated with each link of the switch fabric. On every ingressport, edge and fabric, a set of flow channel queues can be defined.There can be one queue for each flow channel. As packets arrive, theyeither can be assigned to a flow channel on an edge port, or have beenassigned to a flow channel by the link partner's egress fabric port on afabric ingress port. The flow channel information can be used to directthe packets into the appropriate flow channel queue.

FIG. 2A shows an exemplary switch that facilitates flow channels. Inthis example, the switch can include a crossbar switch 202. Crossbarswitch 202 can have a number of input ports, such as input port 204, anda number of output ports, such as output 208. Crossbar switch 202 canforward packets from an input port to an output port. Each input portcan be associated with a number of input queues, each assigned to adifferent incoming flow arriving on that input port. For example, dataarriving on a given port of the switch can first be separated, based ontheir individual flows, and stored in flow-specific input queues, suchas input queue 206. The packets stored in the input queues can bedequeued and sent to crossbar switch 202 based on scheduling algorithmsdesigned to control congestions (described in more detail in latersections). On the output side, once a packet passes crossbar switch 202,it can be temporarily stored in an output transmission queue, such asoutput transmission queue 210, which can be shared by all the flowsleaving on the same output port. Meanwhile, before a packet is dequeuedfrom the output transmission queue and transmitted on the outgoing link,the packet's header can be updated with the flow ID for the outgoinglink. Note that this hop-by-hop flow ID mapping can be done when thefirst packet in the flow travels across the network. When the packetreaches the next-hop switch, the packet can be stored again in aflow-specific input queue and the same process can be repeated. Notethat a flow ID is used to distinguish between flows traveling on thesame fabric link, and can be typically assigned by the transmitter endof this link, which is the output port of the switch that istransmitting onto this link.

By providing flow-specific input queues, the switch can allow each flowto move independently of all other flows. The switch can avoid thehead-of-queue blocking problem, which is common with shared inputbuffers. The flow-specific input queue also allows the packets within asingle flow to be kept in order. When a flow passes through theswitches, a flow-specific input queue on each input port can beallocated for this flow and these input queues become linked,effectively forming one long queue that reaches across the entire fabricfor this flow, and the packets of this flow can be kept in order.

The progress of successful delivery of packets belonging to a flow canbe reported by a sequence of ACKs generated by the edge port of anegress switch. The ACK packets can travel in the reverse direction alongthe data path traversed by the data packets and can be forwarded by theswitches according to the forwarding information maintained in flowtables. As ACK packets travel upstream, they can be processed by eachswitch's input queue manager, which can update the corresponding flow'sstate information based on information carried by the ACK packets. TheACK packets can have a type field to provide advanced information aboutthe downstream data path, such as congestions. A switch's input queuemanager can use this information to make decisions, such as throttlingthe transmission rate or changing the forwarding path, about the pendingdata packets currently buffered in its input queues. In addition, theinput queue manager can update the information carried in an ACK packetbased on state information of a buffered flow, so that the upstreamswitches can make proper decisions. For example, if an input queue for agiven flow is experiencing congestion (e.g., the amount of data in thequeue is above a predetermined threshold), the input queue manager canupdate an ACK packet that is being forwarded to the next upstream switchto include this congestion information.

If an ACK corresponds to the last packet of a flow, a switch candetermine that there is no more unacknowledged data for that flow.Correspondingly, the switch can free the flow channel by removing thecorresponding entry in the flow table.

As mentioned above, the input queue manager at each switch can maintaininformation about transmitted but unacknowledged data of a given flow.FIG. 2B shows an example of how switches along a data path can maintainflow state information. In this example, the data path taken by a flowcan include switches 222, 224, and 226. The amount of transmitted butunacknowledged flow data can be indicated by a variable “flow_extent,”which can be measured in number of fixed-length data units, such as 256bytes. Furthermore, flow_extent and other flow state information can bemaintained by a switch's input queue manager, which can continuouslymonitor all the flow-specific queues.

In the example in FIG. 2B, the value of flow_extent at the input queuemanager of switch is 1, because there is one unit of data that has beensent out of the input queue and forwarded through the crossbar switch.Note that a data packet sent by an input queue might be temporarilybuffered in the output transmission buffer due to the scheduling of allthe data packets to be transmitted via an output link. When such apacket is buffered in the output port's transmission buffer, the packetcan still be considered by the input queue as transmitted for thepurpose of updating the flow_extent value.

Correspondingly, because the input queue for the given flow at switch226 has six queued data units, and two additional data units are intransit between switches 224 and 226, the flow_extent value at switch224 is 9. Similarly, the flow_extent value at switch 222 is 13, becausethere are three data units stored in the input queue at switch 224 andone data unit in transit between switches 222 and 224.

In general, a flow channel can remain allocated to a single flow untilall the ACKs for all the packets sent on the flow channel have beenreturned. This means that flow channel table entries can remain activefor longer near the fabric ingress edge port than near the egress edgeport. If a single packet is injected into the network, a flow channelcan be allocated for the ingress edge port and then another flow channelcan be allocated for the next fabric link the packet traverses and soon, until the last flow channel is allocated when the packet reaches thelast fabric link. Each allocation can generate a flow ID, denoted asvariable “flow_id,” to identify the entries of the flow tables of thefabric link. (More details on flow channel tables are provided in thedescription below in conjunction with FIG. 4A.) This first packet maycause the allocation of a different flow_id, on each of the fabric linksthe packet traverses across the switch fabric.

At the input queue of each switch, the flow channel table entries canindicate each flow's state information, including the flow_extent value,from this point downstream to the flow's egress destination edge port.Packets received on the local input port can increase this flow_extentvalue by the amount of incoming data, and ACKs can reduce theflow_extent by the amount of acknowledged, delivered data.

When a packet reaches the final destination egress port, an ACK packetcan be generated and returned for that packet. This ACK can be routedusing the data path information stored in the corresponding entry of theflow channel tables at every switch along the data path. Optionally, theACK packet itself does not need to carry path information and thereforecan be small and light weight. If no other data packet is sent on theflow, the ACK can release each flow channel in the reverse order. Oncereleased, the flow channel at each switch can be allocated to adifferent flow.

If another packet follows the first packet on the same flow, the ACKcorresponding to the second packet would need to be received before theflow channel can be released at a given switch. In one embodiment, theflow channel can only be released when ACKs for all the transmittedpackets of the same flow have been returned.

Typically, various protocols may require in-order packet delivery. Theflow channels can be used to guarantee this delivery order, even whenthe fabric uses adaptive routing for load balancing across multiple datapaths. If packets between an ingress edge port and an egress edge port,perhaps in a different switch on the far side of the fabric, areinjected at a very low rate, then each packet injected could reach itsdestination and return an ACK back to the source before the next packetis injected. In this case, each packet can be a lead packet and free totake any path across the fabric, using the best available dynamicadaptive routing choice. This is possible because the first packet candefine the flow's path through the fabric.

Now assume that the packet injection rate is increased slightly to thepoint where the next packet of the same flow is injected before thecurrent packet's ACK has returned to the source. The second packet canpass the ACK of the first packet somewhere along the flow's data path.Beyond this passing point, the ACK will have released the flow channelsallocated to the first packet, because the flow_extent value associatedwith the first packet is returned to zero when the ACK is processed bythe flow channel's logic. Meanwhile, the second packet can now define anew flow, because it is again causing flow channels to be allocated oneach of the subsequent fabric links. This second packet, while it iscausing flow channels to be allocated beyond the passing point, can beforwarded to a different path based on dynamic adaptive routing. On theother hand, before the passing point, the second packet can extend theoutstanding flow created by the first packet to include the secondpacket. This means the first packet's ACK may not reduce the flow_extentvalue to zero and the flow channels may remain active before the passingpoint. It also means that the second packet may follow the exact pathtaken by the first packet up to the passing point. Note that while it isfollowing the previous packet, the second packet cannot arrive at theegress edge port before the first packet does, and therefore correctpacket order can be maintained.

If the injection rate for this flow is increased further, the secondpacket will pass the first packet's ACK at a location closer to thedestination edge port. It is also possible that a third, fourth, fifth,or additional packet may enter the fabric before the first packet's ACKis returned to the source edge port, depending on the data packetinjection rate of this flow and the data packet-ACK round trip delay.The maximum packet rate can depend on the size of the packets and thebandwidth of the links. The round trip delay of the data packet and ACKcan be an important parameter for a fabric implementation and can beused along with the maximum packet rate to calculate the maximumrequired number of flow channels for each link. Ideally, a design canprovide a reasonable number of unallocated flow channels regardless ofthe traffic pattern. The demand for the number of flow channel can behigh when a large number of packets arriving at an ingress edge porthave different destinations and these packets have small sizes and highinjection rates. In the most extreme case, each packet could beallocated a different flow channel. These flow channels are freed whenthe packets' ACKs are returned. Correspondingly, the number of flowchannels needed can be calculated as ((Packet rate)*(Average packet toACK round trip latency)).

Note that packet rate on a single flow channel is not to be confusedwith packet rate on a link. If the traffic pattern is such that manysmall packets are being sent to different destinations, then successivepackets sent onto the link can have different destinations. This meansthat each packet could belong to a different flow and could be the onlypacket to use the corresponding flow channel. In this example, the linkcan experience a high packet rate, but the packet rate of individualflows can be low. Optionally, a number of ACKs (e.g., 48 ACKs) can beaggregated together into a single ACK frame for transmission over a linkand protected by a Frame Check Sequence (e.g., a 32-bit FCS). Forexample, the ACKs can occupy 25 bits each, and there can be a 9-byteoverhead to the frame. That is, the overhead per ACK on a full sizeframe is approximately 9/(25/8*48)*100%=6%. The logic can optimize thenumber of ACKs per frame so an ACK does not need to wait too long to beaggregated when the ACKs are arriving slowly. For example, the ACKaggregation logic block can use three timers to manage ACK transmissionbased on the activity of an outgoing link. These timers can be startedwhen a new ACK arrives at the ACK aggregation logic block. If theoutgoing link is idle, a first timer, which can for example be set at 30ns, can be used to hold the ACK while waiting for additional ACKs toarrive. When this timer expires, all the ACK received within thecorresponding time window can be aggregated into one frame andtransmitted onto the outgoing link. If the outgoing link is busy, asecond timer, which can for example be set at 60 ns, can be used to waitfor additional ACKs. Using this second timer can allow more ACKs to beaggregated into a single frame, and this frame can be transmitted onlyif a predetermined number of ACKs are collected. Note that due to theEthernet framing constrains, some numbers of ACKs in a single frame canuse less wire bandwidth per ACKs than other numbers of ACKs. If noefficient number of ACKs are collected, and the outgoing link remainsbusy sending normal data packets, then a third timer, which can forexample be set at 90 ns, can be used. Once this third timer expires, allthe ACKs that have been collected can be aggregated in a frame andtransmitted onto the link. By using these three timers, the system cansignificantly reduce the overhead of sending ACKs on the outgoing link.

In some examples, the ingress edge port of a switch can encapsulate areceived data packet with a fabric header, which allows the packet to beforwarded using flow channels. FIG. 3A shows an exemplary fabric headerfor a data packet. The fabric header can include a flow_id field, whichcan identify the flow channel, and a “data_flow” field, which canindicate the progression of the entire flow.

When a data packet is delivered to its destination, at least one ACK canbe generated. FIG. 3B shows an exemplary ACK packet format. An ACKpacket can include a “flow_id” field, an “ack_flow” field, an “ACK type”field, and a cyclic redundancy check (CRC) field. The flow_id field canindicate the flow this ACK packet belongs to. The ack_flow field canindicate the data packet to which this ACK packet acknowledges. Recallthat each switch can maintain a flow_extent value which indicates theamount of transmitted but unacknowledged data. The value of flow_extentcan be derived as flow_extent=data_flow−ack_flow, wherein data_flowvalue is taken from the last transmitted data packet.

The ACK type field can indicate different types of ACKs. As mentionedabove, during normal operation, when a data packet is delivered to thedestination edge port, a regular ACK packet can be generated and sentback to the source. Correspondingly, the ACK type field in the ACKpacket can indicate a normal ACK. When congestion occurs in the fabric,the ACK type field can be used to indicate various types and severity ofcongestion, such as a new congestion, a persistent congestion, or asevere congestion at the egress edge port that calls for rerouting ofthe flow. In addition, under special circumstances such as the presenceof a severely congested fabric link, dropped packets, or link error, anACK can also be generated by an intermediate switch that is not thefinal destination, and the ACK type field can be used to notify upstreamswitches of different types of network condition. Other additionalfields can also be included in an ACK packet.

FIG. 3C shows the relationship between different variables used toderive and maintain state information of a flow. In this example, aswitch can use the variable “total_extent” to track the total amount ofunacknowledged transmitted data and data currently queued at the switch.The value of total_extent can equal the sum of flow_extent, which is theamount of transmitted and unacknowledged data, and queue_extent, whichis the amount of data stored in the input queue for the correspondingflow. The variable “ack_flow” can indicate the data position thatcorresponds to the latest ACK for this flow. The variable “data_flow”can indicate the position of the next data packet to be transmitted,which also corresponds to the data packet stored at the head of theinput queue. The variable “next_data_flow” can indicate the position ofthe next data packet that the switch can expect to receive from theupstream switch. Note that queue_extent=next_data_flow−data_flow, andflow_extent=data_flow−ack flow.

In some examples, flow channel tables can be used to facilitate flowchannels throughout a fabric is. Flow channel tables are data structuresthat store the forwarding and state information for a given flow at theport of a switch. FIG. 4A shows an example of how flow channel tablescan be used to store state information associated with multiple flows.This state information can be specific to each flow and efficientlystored in a table. Assume that a source host 402 is sending data packetsto a destination host 404 via a fabric. The data path traversed by thedata packets can include an ingress edge switch 406, intermediateswitches 408 and 430, and egress edge switch 432.

When a packet arrives on an ingress edge link 403 of switch 406, thepacket's header can be analyzed by an address translate logic block 410.Address translate logic block 410 can determine the destination fabricaddress of the egress switch (which in this case is switch 432) based onthe packet's Ethernet, IP, or HPC header information. Note that headerinformation associated with other protocols or a combination ofdifferent protocols can also be used by address translate logic block410. The fabric destination address determined by address translatelogic block 410 can then be used to perform a lookup in an edge flowchannel table (EFCT) 412. EFCT 412 can perform a lookup operation forthe packet using the packet's fabric destination address and optionallyadditional values extracted from the packet's header, which can bereferred to as a match pattern. EFCT 412 can compare the packet's matchpattern against stored match patterns of all existing allocated flows.If a match is found, then this packet is part of an existing flow andthe previously allocated flow ID can be returned for this packet. If nomatch is found, a new flow ID can be allocated for this packet, and amatch pattern can be added to EFCT 412. In other words, EFCT 412 can beused to determine whether a flow channel already exists for the incomingpacket, or whether a new flow channel needs to be allocated. In additionto the destination fabric address, other packet header information suchas traffic class, TCP or UDP port number, and process or thread ID canbe used to map or allocate flow IDs.

The flow ID obtained by EFCT 412 can then be used as an index to map toan entry in an input flow channel table (IFCT) 414. Each entry in IFCT414 can be indexed by a flow ID and store state information for thecorresponding flow. An entry in IFCT 414 can store the values ofnext_data_flow, data_flow, and ack_flow (see FIG. 3C) associated with aflow. In addition, an IFCT entry can store other parameters forcongestion control and dynamic routing for a flow.

The flow ID can also be used to identify or allocate a flow-specificinput queue in which the incoming packet can be temporarily stored. Thestate information for a particular queue, as well as parameters formonitoring and controlling the queue (such as threshold for detectingcongestion) can be stored in the corresponding entry in IFCT 414. Aninput queue management logic block can determine when a packet can bedequeued from the input queue and sent to a data crossbar switch 413based on flow-control parameters stored in the entry of IFCT 414.

When a packet is deqeued from the input queue and sent through crossbarswitch 413 to an output port, the packet is sent with the input portnumber on which it has arrived at switch 406. When the packet reaches anoutput port's transmission buffer, the packet's header can be updated,based on the packet's flow ID and input port number, with a new flow IDto be used by the next-hop switch (i.e., switch 408) for the same flow.This is because each link, in each direction, can have its own set offlow channels identified by their respective flow IDs. The mapping fromthe incoming flow ID to the outgoing flow ID used on the next link canbe done by looking up an output flow channel table (OFCT) 416. OFCT 416can perform a lookup using a match pattern that is a combination of thelocal input port number corresponding to link 403 and the packet's flowID which is produced by EFCT 412. If a match is found, then the flow hasalready been defined, and the packet's flow ID is updated with the valuecorresponding to the match pattern (this new outgoing flow ID is to beused by the downstream next-hop switch 408). If a match is not found,then a new flow channel can be allocated with a new, outgoing flow ID,which can be mapped to the input port number and the previous, incomingflow ID. An entry including the outgoing flow ID, input port number, andincoming flow ID can be stored in OFCT 416.

In the case where the packet is the first packet in the flow, a lookupin OFCT 416 would not produce any mapping. In turn, OFCT 416 canallocate for the packet a flow channel with a flow ID to be used by theinput port and IFCT 418 on switch 408. This new flow channel, identifiedby its flow ID, can be added to the packet header for transmission ontolink 417, and can be used by the link partner's (which is switch 408)IFCT 418 to access the flow channel's congestion information. As before,OFCT 424 can further generate a new flow channel if no match is found,using the match pattern of its immediate upstream input port number andflow ID associated with link 417. OFCT 424 can then allocate a new flowchannel identified by a new flow ID. Note that OFCT 416 can alsofunction as a forwarding table for ACKs of this flow in the upstreamdirection. After being forwarded upstream from switch 408 to switch 406,the ACK packet can be updated with the flow ID associated with edge link403 and forwarded to the appropriate input port on switch 406 asindicated by the corresponding entry in OFCT 416. The ACK packets can beforwarded to the input port by an ACK crossbar switch 415 in theupstream direction.

Subsequently, when the packet arrives at switch 408, its flow ID can beused to identify an input queue to use and to determine an entry in IFCT418. If the packet's flow ID has not been previously allocated by switch408, a new input queue can be provided and a new entry in IFCT 418 canbe created. From this point onward, a similar process can be performedto forward the packet across switches 408 and 430 until the packetreaches egress switch 432.

When the packet reaches switch 432, after the packet is forwarded by adata crossbar switch 423, an ACK generator logic block 420 can generatean ACK packet based on the packet's flow ID and input port number. ThisACK packet can then be forwarded in the upstream direction by an ACKcrossbar switch 422. At the same time, based on the ACK packet, an IFCT421 can update the state information for the flow in the correspondingtable entry. When the ACK packet reaches switch 430, an OFCT 419 can belooked up to determine the upstream flow ID and upstream input port towhich the ACK packet is to be forwarded. The ACK packet can then haveits flow ID updated and be forwarded to the appropriate input port inthe upstream direction. As the ACK packet traverses the data pathupstream in a similar way, the IFCT at each switch can update its tableentry for the flow based on the ACK.

Note that the flow_extent variable can be an important parameter,because it represents the total amount of downstream packet data for aflow. A flow channel is considered free to be reallocated to anotherflow when the flow_extent of an entry is zero. In general, on receipt ofa new packet, the input logic can make a request to send data to anoutput port. The selected output port can be a function of theflow_extent stored in the IFCT. If flow_extent is zero, there are nopackets downstream in the flow to the destination egress edge port. As aresult, the switch can use a load based adaptive route selection tochoose any valid path that leads to the destination. In a multi-pathnetwork, dynamic adaptive routing can be done without the packet beingreordered. If flow_extent is not zero, and if in-order delivery isrequired, the packet can use the same route taken by previous packets.The IFCT can have a field that stores a previous output port number,which is loaded when a packet request is made to an output port and canbe used to ensure a connection to the previously used output port.

As mentioned before, the flow channels can use a match function torecognize packets belonging to an existing flow. Received Ethernetframes or other types of packets can be parsed in real time when theframe or packet is received on an ingress edge port and some fields ofthe packet header can be used for a lookup in a CAM or Ternary ContentAddressable Memory (TCAM). If there is a match, the match address canbecome the flow ID used to select a flow channel. When no match occurs,the switch hardware can load the pattern that fails to match directlyonto a free line of the CAM, which can be done without additional delay.As a result, any following packet can be matched to this new entrywithout significant amount of buffering. The free entry chosen becomesthe new flow ID for the new flow channel entry. Note that no externalsoftware intervention is required for the loading of the new entry. Theprocess can be completed autonomously by the switch hardware.

The de-allocation of flow IDs and corresponding CAM match lines can alsobe automatically performed by the hardware when the last ACK is returnedfor the flow. The de-allocation can occur in hardware with respect topotentially matching new packets, without external softwareintervention.

In some examples, ingress edge switch 406 can include a fine-grain flowcontrol logic block 434, which can communicate with a network interfacecontroller (NIC) 401 on host 402 to apply flow control on a per-flowbasis. More details on find-grain flow control are provided below inconjunction with the description on congestion management.

FIG. 4B shows an example of an EFCT. In this example, an EFCT caninclude a data_flow field 454, an ACK_flow field 456, and optionallyadditional fields. The EFCT can be associated with an input port, andentries in the EFCT can be indexed by flow_ID values, such as flow_ID452. In one embodiment, the match pattern field can reside in the matchfunction logic block, which can include a CAM or TCAM. The matchfunction logic block can use the match pattern to generate the flow_IDvalue, which in turn can be used as an index to the corresponding EFCTentry. From this EFCT's perspective, the flow_extent (i.e.,data_flow−ack_flow) can include all the unacknowledged data downstreamof this table, which can include the local flow_queue plus thecorresponding IFCT's flow_extent value.

FIG. 4C shows an example of an IFCT. In this example, an IFCT can beassociated with an input port, and can include a follow_port field 466,a next_data_flow field 468, a data_flow field 470, an ACK_flow field472, an ep_congestion vield 474, an upstream metering (UM) flag field477, a downstream metering (DM) flag field 478, and optionallyadditional fields. An incoming packet's flow_ID value, such as flow_ID464, can be used as an index to look up the output port number, which isindicated by follow_port field 466, and the state information associatedwith the corresponding flow. Congestion-control information associatedwith endpoint congestion (such as ep_congestion field 474) and(hop-by-hop credit-based flow control (such as UM flag field 477 and DMflag field 478), which is described in more detail later in thisdocument, can also be stored in the IFCT. The IFCT can further storeinformation related to dynamic routing associated with different flows.

FIG. 4D shows an example of an OFCT. In this example, an OFCT can beassociated with an output port, and can include an input_port field 482,an input_port_flow_ID field 484 (which corresponds to a packet'sexisting flow ID upon its arrival at an input port), a data_flow field486, an ACK_flow field 488, and optionally additional fields. Data_flowfield 486 and ACK_flow field 488 can be used to determine the value offlow_extent from this OFCT onward. The combination of input_port field482 and input_port_flow_ID field 484 (which can also be referred to as“incoming flow ID”) can be used to determine or allocate the outgoingflow_ID of a packet that is ready for transmission onto the outgoinglink corresponding to this OFCT. In one embodiment, the outgoing flow_IDvalues, such as flow_ID 486, can be used as an index to look up entriesin the OFCT.

Congestion Management

As described above, each flow at a given switch can have its own privatequeue of packets. This configuration facilitates separate flow controlfor each flow. As a result, the network can remain mostly lossless, andone flow using a link can be blocked without blocking any of the otherflows using the same link. Unlike a traditional packet switched network,congestion in one part of the network can only affect the flows that arecontributing to the congestion. For example, in a conventional network,the buffers before a congested link can quickly fill up with the packetscausing the congestion. This in turn can force the switch to issue apause command or use some other flow control method to preventneighboring switches from sending packets toward the congested link.Consequently, the packets causing congestion can be stopped or sloweddown, and all other packets, which may not be heading to the congestedlink, can also be stopped or slowed down. As a result, the congestioncould spread sideways and increase the size of the saturation tree froma topological perspective.

In contrast, with flow channels, the load corresponding to flowscontributing to congestion can be reduced on the links leading up to thecongestion. This reduction of load can allow other flows that aresharing these links to use more link bandwidth and deliver their payloadmore quickly, while only the packets contributing to the congested linkare slowed down.

Typically, conventional networks can operate normally provided thenetwork load is not at or near full capacity. This can be the case forsmall or medium sized networks most of the time. With large or verylarge networks operating with multiple bandwidth-hungry applications,however, at any point in time part of the network can be saturated withtraffic load. Under these circumstances, unfair packet delivery couldoccur even if individual switches implement locally fair policies.

FIG. 5 shows an example where an unfair share of link bandwidth canoccur in a network. In this example, each of the sources A to K istrying to send a stream of packets to destination L, forming an incastscenario where multiple sources are sending packets to a singledestination. Source nodes A, B, and C are coupled to switch 502; sourcenodes D, E, and F are coupled to switch 504; source nodes G, H, and Iare coupled to switch 506; and source nodes and J and K, and destinationnode L are coupled to switch 508. Assume that each switch has a fairarbitration policy of selecting an equal number of packets from each ofits input ports to any particular output port. However, as can be seenin FIG. 5 , sources closer to the destination can receive a much higherproportion of the final link bandwidth than sources the traffic of whichneeds to pass through more stages of switching. Switch 508 has threesources of incoming data from nodes J, K and switch 506, and can dividethe bandwidth on the outgoing link to node L equally among each source.Hence, nodes J, K can each take 33.3% of the bandwidth on the outgoinglink toward destination node L.

The next nearest switch, which is switch 506, can do the same and so on.In this example, with only four stages of switches and only three orfour inputs on each stage, and only with a total of 11 inputs trying tosend to the destination node L, three input sources (nodes A, B, and C)only take 1/48 the bandwidth taken by two other input sources (nodes Jand K) on the outgoing link toward destination node L. Hence, even withlocally fair arbitration policies, nodes that are far away from thedestination can suffer from very unfair treatment. A more realisticnetwork topology can involve more switching stages, greater numbers ofswitch inputs, and more sources trying to send to a single destination.A moderate-sized incast could result in six orders of magnitudedifference between the delivered bandwidths among different sources.

The unfairness problem described above is often caused by the fact thatthe arbitration policies implemented by a switch are based on the inputports. That is, the bandwidth throttling is done with a per-portgranularity. In contrast, by facilitating flow channels and implementingflow-specific throttling, a network can significantly reduce the amountof unfairness among different flows. For example, in the scenario shownin FIG. 5 , when the switches implement a fair per-flow bandwidthallocation policy, all the eight source nodes can take substantiallyequal share of the bandwidth of the edge link between switch 508 anddestination node L. By providing a much fairer flow based arbitrationpolicy, extreme tail latencies of individual packets can also besubstantially reduced. For large system installations, controlling themaximum latencies through a network is often a major concern forarchitects. Often, this can only be achieved by restricting the inputbandwidth into a network to a small percentage of the peak bandwidth.For example, a input bandwidth limit of 20% of the peak bandwidth can betypical for large datacenters. With flow channels and proper controlmechanisms, in contrast, it is now possible to build a network that doesnot impose such restrictions.

In addition to fairness, another challenge faced by network architectsis congestion. In general, two types of congestions can occur in anetwork. The first type is endpoint congestion, where an egress edgelink coupled to a destination device is congested. The second type isfabric link congestion, where an intermediate fabric link is congested.

FIG. 6 shows an example of endpoint congestion. In this example, twosource hosts 602 and 604 are sending data to a destination host 606.Traffic from source hosts 602 and 604 converges at edge switch 610, andan egress edge link 608 between switch 610 and host 606 can becomecongested. This congestion scenario can typically occur with incast,where multiple sources are sending traffic to a single destination.Congestion can occur when egress edge link reaches its full data ratecapacity, or when destination host 606 cannot process all the incomingpackets at a sufficiently fast rate. In any case, the outputtransmission buffer on switch 610 that is coupled to link 608 canexperience an increase in its stored data amount when endpointcongestion occurs.

A switch can detect and mitigate endpoint congestion by monitoring theoutput buffer on an egress edge link and by sending ACKs with congestioninformation to upstream switches and source nodes. More specifically,the output buffer coupled to an egress edge link can monitor the stateof the buffer and detect congestion when certain criteria are met. Whena packet arrives at or leaves an output buffer, the output buffer cancompute three congestion-detection parameters, such as: (1) the amountof data stored in the buffer, (2) the number of packets stored in thebuffer, and (3) the rate of change of buffer depth (amount of datastored in the buffer). Three threshold values can be set respectivelyfor these three monitored parameters, although more or less can be set.Congestion is considered to be present when at least one of theseparameters exceeds the corresponding threshold.

When congestion is detected, the switch can generate and transmit anendpoint-congestion-notification ACK corresponding to the packet thathas just entered the output buffer. The ACK can include a valueindicating the severity of the congestion. Note that thisendpoint-congestion-notification ACK is not intended to notify upstreamswitches of the successful delivery of the packet, but to inform them ofthe presence and degree of congestion at the egress edge link. (In factwhen this endpoint-congestion-notification ACK is sent, the packet maystill be stored in the output buffer waiting to be transmitted onto theegress edge link.) This fast, explicit congestion notification mechanismallows the switches to act quickly on a specific flow contributing tothe congestion.

In addition, the output buffer can update the congestion-detectionparameters when a packet is dequeued and transmitted onto the egressedge link. If no congestion is present, a regular ACK is generated andsent, which can clear any previous congestion notifications received bythe upstream switches operating on the corresponding flow. If congestionis present, the ACK can be marked with a flag, which allows the ACK tonotify the switches of persistent congestion at the egress edge link aswell as the successful delivery of the packet.

FIG. 7A shows a flow chart of an exemplary process of generating anexplicit endpoint-congestion-notification ACK. During operation, thesystem can continuously monitor an egress edge link's output buffer. Thesystem can then receive a packet at the output buffer (operation 702).Upon receipt of the packet, the system can compute the three congestionparameters (total amount of data, total number of packets, and rate ofchange of buffer depth) for the output buffer (operation 704). Thesystem can further determine whether any of the parameters exceeds acorresponding threshold (operation 706). If at least one parameterexceeds the threshold, congestion is considered to be present.Accordingly, the system can generate and send an explicitendpoint-congestion-notification ACK packet corresponding to thepacket's flow to the upstream switches (operation 708). If no congestionis detected, the system can return to normal operation.

FIG. 7B shows an exemplary endpoint congestion management logic block.In this example, an endpoint congestion management logic block 730 caninclude an output buffer monitor 732, a congestion parameter computationlogic block 734, and an endpoint-congestion-notification ACK generationlogic block 736. During operation, output buffer monitor 732 can monitorthe state of an output buffer associated with an egress edge link. Basedon the state of the monitored output buffer, congestion parametercomputation logic block 734 can compute the three congestion parameters(see operation 704 in the flow chart in FIG. 7A). When one of theseparameters exceeds the corresponding threshold,endpoint-congestion-notification ACK generation logic block 736 cangenerate an endpoint-congestion-notification ACK and transmit the ACK tothe upstream switch.

FIG. 8 shows a flow chart showing of exemplary process of generating anACK in response to a packet being dequeued from an output buffer. Inthis example, the system first dequeues a packet from the output buffer(operation 802). The system can then compute the three congestionparameters (total amount of data, total number of packets, and rate ofchange of buffer depth) for the output buffer (operation 804). Thesystem can determine whether any of the parameters exceeds acorresponding threshold (operation 806). If at least one parameterexceeds the threshold, congestion is considered to be present.Accordingly, the system can generate an ACK packet with a marked flagindicating persisting congestion (operation 808). If no congestion isdetected, the system can generate a regular ACK packet (operation 809).The system can subsequently send the ACK packet to the upstream switches(operation 810), and transmit the dequeued data packet onto the egressedge link (operation 812).

Note that the endpoint congestion management logic block shown in FIG.7B can also perform the operations described by the flow chart shown inFIG. 8 . In other words, endpoint congestion management logic block 730can potentially general endpoint-congestion-notification ACKs upon thearrival of a packet at the output buffer as well as the departure of thepacket from the output buffer.

As an endpoint-congestion-notification ACK traverses the fabric, theIFCT's of the switches along the path can apply bandwidth limitations tothe flow corresponding to the ACK. Effectively, the fabric can slow downthe delivery of that flow in a distributed way at each switch along thedata path. When an endpoint-congestion-notification ACK passes an IFCTits value can be stored in the flow's table entry as an ep_congestionvalue, which can be used to select a desired maximum bandwidth for theflow. Each value of ep_congestion can have a corresponding set of high,target, and drop watermark values. For high levels of congestion, whenep_congestion has a high value, the watermark values can have lowervalues, so that the congestion can be mitigated more aggressively. Forlow levels of congestion, when ep_congestion has a low value, adifferent set of greater high, target, and drop watermark values can beused for higher flow bandwidth. For example, a table indexed by theep_congestion value can be used. For each ep_congestion value, the tablecan indicate a corresponding set of high, target, and drop watermarkvalues. The entries of this table can be predetermined, so that when anendpoint-congestion-notification ACK is received, the switch can use theep_congestion value to perform a lookup in this table, and apply thethree corresponding watermark values to the identified flow.

In some cases, if the source is injecting data in a greedy manner, onlyslowing down the forwarding inside the network might not be sufficientto fully remove the congestion. To address this problem, an ingress edgeswitch can be configured to instruct the source device (which typicallyresides outside the fabric) to limit data injection on a fine-grain,per-flow basis. This switch-to-host flow control mechanism can bereferred to as Fine Gran Flow Control (FGFC).

In particular, especially in an HPC environment, an end host orcomputing node could have a large number of cores running numerousthreads, processes, or virtual machines, each of which could beinjecting their own stream of data into the network through a commonphysical network interface controller (NIC). When congestion is present,a per-port based flow control can only throttle the overall data rateover a single port on the NIC, which can be 40 Gb/s or more. Pushingback on the total data rate on the entire port can cause unfairness toflows that are not contributing to congestion. FGFC can extend theconcept of the individual flows or group of associated flows to theirultimate source, which can be a single thread executing on one of thecores.

To slow down data injection from the source, an FGFC logic block on aningress edge switch (for example, FGFC logic block 434 in edge switch406 in FIG. 4A) can use a pause-credit hybrid method to throttleincoming data associated a particular flow or group of flows. Apause-based method typically involves a receiving end issuing a pausecommand to the transmitter end, which in response can stop transmissionuntil further notice. With a credit-based method, the receiving end canissue transmission credits to the transmitting end, which allows thetransmitter to send more data but only up to the amount specified by thecredit value. This mechanism allows the receiving end to control moreprecisely its input buffer depth to avoid overflow while allowingtransmission to continue. FGFC can use a hybrid method, in which upondetection of congestion the ingress edge switch can issue a FGFC framefor one or more flows with a set timer value to the end host NIC (suchas NIC 401 on end host 402 in FIG. 4A). After the FGFC frame isreceived, the ingress edge switch may turn on a credit-based flowcontrol mode. In response, the NIC can throttle the transmission datarate for the corresponding flow(s) based on the received credit, whileallowing other flows to be transmitted at normal data rate. After thepredetermined timer expires, the end host NIC can revert to normaltransmission for the throttled flow(s), unless another pause command isreceived. Note that a throttled flow can be identified by any fieldderived from a packet. A throttled flow can be specific to a singleprocess or thread executed on the end host.

FGFC can implement the control communication between an edge switch andan end host NIC using an Ethernet frame with an Organizationally UniqueIdentifier (OUI) extended Ether_Type field. These frames can indicateone or more of the following: (1) the protocol used by the flow beingcontrolled; (2) an identifier to indicate the source (e.g., application,process, or thread) generating the packets that need to be throttled;(3) a pause time value for which the flow control is to last (which canprevent a lockup if subsequent FGFC frames are lost due to errors), and(4) a credit value, which can be zero, to indicate the number of framesor amount of data that can be sent during the pause period.

Note that the identifier for indicating the source flow subject to flowcontrol can be different based on the protocol associated with the flow.For layer-2 Ethernet virtual local area network (VLAN) traffic, theidentifier can include the VLAN number. For IPv4 traffic, the identifiercan include a source/destination IP address pair, a UDP or TCP/IP5-tuple that includes UDP or TCP port numbers, or an optional flowlabel. For IPv6 traffic, the identifier can include one or more IPv6addresses or an IPv6 flow label. For proprietary HPC protocol traffic,the identifier can include a process or thread ID. In general, thisidentifier is also stored in the EFCT of the edge switch, since it isused to map the corresponding traffic to aflow ID.

To trigger FGFC, the IFCT of an ingress edge switch can monitor itsflow-specific input queues. For each queue, the corresponding IFCT entrycan indicate three watermark values: high, target, and drop, which canbe used to measure the queue depth. In some examples, these watermarkvalues can be included as additional fields in the IFCT as shown in FIG.4C, or can be stored in a separate table and linked by a field in theIFCT. When the queue depth is less than the target value, no FGFC isnecessary. When the queue depth reaches the target watermark value, theIFCT can communicate with an FGFC logic block to initiate FGFC with anend host's NIC. When the queue depth reduces to below the drop watermarkvalue, FGFC can be stopped and normal transmission for the flow can beresumed.

FIG. 9A shows a flow chart of an exemplary FGFC process. Duringoperation, at an ingress edge switch, the system can monitor theflow-specific input queues (operation 902). The system can furtherdetermine, for a respective flow, whether FGFC is currently turned on(operation 904). If FGFC is currently turned on for this flow, thesystem can then determine whether the queue depth is below the dropwatermark (operation 906). If the queue depth has not reduced to belowthe drop watermark, the system can continue the credit basedtransmission in the FGFC mode (operation 912). If the queue depth hasreduced to below the drop watermark, the system can revert to normaltransmission for the flow (operation 914). Referring back to operation904, if FGFC is currently not turned on, the system can determinewhether the queue depth is greater than the target watermark (operation908). If so, the system can initiate FGFC for the flow (operation 910).The FGFC logic block in the edge switch can obtain flow identifyinginformation (e.g., VLAN tag, TCP/IP 5-tuple, thread ID, etc.) from theEFCT entry corresponding to the flow and send an FGFC Ethernet frame tothe NIC on the end host. Subsequently, the system can continue tomonitor the input queues (operation 902). If the queue depth is notgreater than the target watermark, the system can continue regular datatransmission (operation 914)

To facilitate FGFC, a NIC can be configured to process the FGFC Ethernetframe, so that the NIC can communicate to the application or process onan end host that is generating the data. Parsing of the FGFC Ethernetframe and communication to the application or process can be done insoftware, hardware, or a combination of both. FIG. 9B shows an exampleof a FGFC-enabled NIC. In this example, a NIC 930 can include aprocessor 932, a memory 934, a transmitter 936, a receiver 938, a FGFClogic block 940, and a communication logic block 942. During operation,transmitter 936 and receiver 938 can perform communication to and froman edge switch via an edge link. Communication logic block 942 canperform communication via a data bus (such as a Peripheral ComponentInterconnect Express (PCIe) bus) with the central processing unit of theend host in which NIC 930 resides. Processor 932 and memory 934, whichare internal to NIC 930, can perform local processing of the data.During operation, FGFC logic block 940 can work with an edge switch toapply FGFC on a per-flow basis. In addition, FGFC logic block 940 cancommunicate via communication logic block 942 with the end host'scentral processing unit to throttle and data injection of an individualapplication or process corresponding to the specific flow subject toFGFC, thereby controlling the amounted of data injected into the fabric.

As mentioned above, two types of congestions can occur in a network. Afirst type is endpoint congestion, and a second type is fabric linkcongestion. FIG. 10 shows an example of fabric link congestion. In thisexample, two intermediate switches 1002 and 1006 are in communicationvia a fabric link 1004. Multiple source/destination pairs can be sendingtraffic via fabric link 1004. As a result, fabric link 1004 canexperience congestion, although the links leading up to and away fromfabric link 1004 might not be congested. Fabric link 1004 can appear tobe a “hot spot” when such congestion occurs.

To mitigate fabric link congestion, a switch can apply dynamic per-flowcredit-based flow control. At a switch, if an input queue starts to fillup, and the queue_extent value for this flow reaches a predeterminedthreshold, the switch can generate a special ACK to notify the upstreamswitch's IFCT of the congestion. This special per-hop ACK can bereferred to as “HeadroomACK.” Upon receiving the HeadroomACK, theupstream switch's IFCT can start a credit based flow control with thedownstream switch. In the downstream IFCT entry, a flag UpstreamMetering (UM) can be set to indicate that the data transmission from theupstream switch is now metered based on the credits. The HeadroomACKpacket can also include a credit value.

When the upstream switch receives a HeadroomACK, a flag calledDownstream Metered (DM) can be set in the corresponding entry of theIFCT. The IFCT can also store a signed headroom field in the IFCT entrywith the credit value carried by the HeadroomACK (i.e., the headroomvalue indicates the number of credits). This headroom field canrepresent the amount of data that can be forwarded to the downstreamswitch. This establishes a credit based flow control for thecorresponding flow. If the upstream IFCT receives a HeadroomACK whilethe DM flag in the flow's entry is already set, the credit value carriedby the HeadroomACK can be added to the existing headroom value.

New packets received by the upstream IFCT can be blocked if the headroomvalue is not greater than zero (i.e., there is no credit available).These packets can fill this flow's input queue and may in turn cause theIFCT to initiate per-flow credit based flow control with its upstreamIFCT, and so on. If the headroom value is greater than zero, a packetstored in the input queue can be dequeued and forwarded to thedownstream switch, and the headroom value can be decremented by the sizeof the forwarded packet, which may cause the headroom value to becomezero or negative.

With the flow restricted from sending new packets to the downstreamIFCT, the downstream IFCT's input queue can start to drain at some ratedepending on its downstream congestion. As described above, each flow'sinput queue can have three queue-depth watermark values, namely high,target, and drop, which can be used to manage credit-based flow control.The target watermark can be approximately the ideal queue depth for thedesired flow bandwidth. It indicates sufficient buffering is availablefor transmitting data downstream. When there is congestion, thecredit-based flow control mechanism can attempt to keep the flow'squeue_extent value approximately at this target watermark.

If the queue_extent value is between the high watermark and dropwatermark, and is greater than the target watermark, when a packet isforwarded, slightly less than this packet's size of credit can bereturned with a HeadroomACK to the upstream switch. If the queue_extentvalue does not exceed the target watermark, when a packet is forwarded,slightly more than this packet's size of credit can be returned with theHeadroomACK to the upstream switch.

If the queue_extent depth is greater than the high watermark, no creditis returned when packets are forwarded. This mechanism can bring thequeue_extent value down more quickly and is usually used when congestionis detected for the first time. If the congestion clears, the flow'sinput queue can start to empty more quickly. When the queue depth isless than the drop watermark, the credit-based flow control can beswitched off. This can done by clearing the UM flag in the IFCT entryand returning a HeadroomACK with the maximum credit value to theupstream switch. When received by the upstream IFCT the HeadroomACKclears the entry's DM flag and flow control against the headroom valueis turned off.

Note that in a typical network topology there can be a number ofswitches and between two endpoints there can be multiple data paths. Ina multi-path network, it is possible to use various methods to controlfabric link congestion. For example, the injection limits, describedlater in this document, can control the maximum total amount of data inthe entire fabric. This means that if a particular fabric link isoverloaded, a flow can use a different data path that does not gothrough the congested link. It is possible to detect an overloaded linkand generate “reroute” ACKs for a set of flows. The reroute ACKs cantemporarily block the flow in an upstream switch, and when all the ACKsfor that flow have been returned, the flow can be unblocked and becomefree to use a different path across the fabric. A dynamic load-basedadaptive routing mechanism can then direct the lead packet to use adifferent uncongested fabric link. In turn the load across the entirefabric can become more balanced.

FIG. 11 shows a flow chart of an example process of applyingcredit-based flow control on a congested fabric link. During operation,a switch system can monitor its flow-specific input queues (operation1102). The system can determine whether an entry in its IFCT has a UMflag set (operation 1104). If the UM flag is set, which means thatcredit-based flow control is on, the system can further determinewhether the queue_extent value is less than the drop watermark value(operation 1106). If the queue_extent value is less than the dropwatermark value, the system can clear the UM flag, turn off thecredit-based flow control, and resume normal data transmission(operation 1014). If the queue_extent value is greater than the dropwatermark value, the system can continue the credit-based flow control(operation 1106). Referring back to operation 1104, if the UM flag isnot set, which means the system is in regular transmission mode, thesystem can determine whether the queue_extent value is greater than thetarget watermark value (operation 1108). If so, the system can initiatecredit-based flow control and send a HeadroomACK to the upstream switch(operation 1110). If the queue_extent value is not greater than thetarget watermark value, the system can continue with regular datatransmission (operation 1112).

In general, a flow channel switch can use a combination of severalcongestion detection and control mechanisms. For example, differentdegrees of endpoint congestion can be reported using theendpoint-congestion-notification ACK that can be returned from the finalfabric egress edge port. This ACK type can be used to manage thebandwidth of flows into a significantly congested egress edge port. Thesystem can also use a per-hop credit-based flow control to manage fabriclink congestion. This per-hop congestion management mechanism can beeffective against low to moderate levels of congestion, because theresponse time can be much shorter than the network-wise round tripdelay.

If the congestion is severe, perhaps caused by a wide incast, the systemcan also apply a per-flow injection limit. A flow's injection limit canbe determined based on the ep_congestion value. The injection limit canbe compared with the flow_extent value in all IFCTs the flow passesthrough. If the flow_extent is greater than this limit the IFCT canblock the forwarding of packets from the input queue for this flow. Thismechanism can reduce the rate of forwarding of packets over an entireflow to as little as a single packet.

The system can also protect unrelated traffic from extreme congestioncaused by incasts with a large number of contributors. In this case, theep_congestion value can be set to a high value and the average amount ofdata of a flow can be reduced to a small fraction of a packet. This canbe achieved by only releasing the next packet of an individual flow intothe fabric from the ingress edge port's IFCT after a programmable delayhas elapsed since when the ACK of the previous packet has been received.

In addition to per-flow injection limits, the system can measure theamount of data that has been injected into the fabric on aper-ingress-port basis, and set injection limits to impose a cap on thetotal amount of data a port can inject into the fabric. Since everyingress port can apply this injection limit, the system can control themaximum amount of data allowed inside the fabric. Limiting the totalamount of data into the fabric can ensure that buffer exhaustion doesnot occur where bandwidth is scarce. As a result, traffic which is notusing the paths with reduced bandwidth are not affected.

To facilitate per-port injection limit, an IFCT can maintain a totaltraffic count. Each time a packet is injected into the fabric from theedge port the total count can be incremented. When a flow's ACK isreturned, the total traffic count can be decremented. Once all the ACKsof all the flows of an ingress port have been returned (i.e., when thesum of the flow_extent values for all the flows becomes zero), the totaltraffic count can be set to zero.

FIG. 12 shows an exemplary edge switching system that facilitates flowchannels (which, for example, can correspond to switch 406 in FIG. 4A).In this example, a switch 1202 can include a number of communicationports, such as port 1220. Each port can include a transmitter and areceiver. Switch 1202 can also include a processor 1204, a storagedevice 1206, and a flow channel switching logic block 1208. Flow channelswitching module 1208 can be coupled to all the communication ports andcan further include a crossbar switch 1210, an EFCT logic block 1212, anIFCT logic block 1214, and an OFCT logic block 1216.

Crossbar switch 1210 can include one or more crossbar switch chips,which can be configured to forward data packets and control packets(such as ACK packets) among the communication ports. EFCT logic block1212 can process packets received from an edge link and map the receivedpackets to respective flows based on one or more header fields in thepackets. In addition, EFCT logic block 1212 can assemble FGFC Ethernetframes, which can be communicated to an end host to control the amountof data injected by individual processes or threads. IFCT logic block1214 can include the IFCT, and perform various flow control methods inresponse to control packets, such as endpoint-congestion-notificationACKs and fabric-link credit-based flow control ACKs. OFCT logic block1216 can include a memory unit that stores the OFCT and communicate withanother switch's IFCT logic block to update a packet's flow ID when thepacket is forwarded to a next-hop switch.

FIG. 13 shows an exemplary intermediary switching system thatfacilitates flow channels (which, for example, can correspond toswitches 408 and 430 in FIG. 4A). In this example, a switch 1302 caninclude a number of communication ports, such as port 1320. Each portcan include a transmitter and a receiver. Switch 1302 can also include aprocessor 1304, a storage device 1306, and a flow channel switchinglogic block 1308. Flow channel switching module 1308 can be coupled toall the communication ports and can further include a crossbar switch1310, an EFCT logic block 1312, an IFCT logic block 1314, and an OFCTlogic block 1316.

Crossbar switch 1310 can include one or more crossbar switch chips,which can be configured to forward data packets and control packets(such as ACK packets) among the communication ports. EFCT logic block1312 can process packets received from an edge link and map the receivedpackets to respective flows based on one or more header fields in thepackets. In addition, EFCT logic block 1312 can assemble FGFC Ethernetframes, which can be communicated to an end host to control the amountof data injected by individual processes or threads. IFCT logic block1314 can include the IFCT, and perform various flow control methods inresponse to control packets, such as endpoint-congestion-notificationACKs and fabric-link credit-based flow control ACKs. OFCT logic block1316 can include a memory unit that stores the OFCT and communicate withanother switch's IFCT logic block to update a packet's flow ID when thepacket is forwarded to a next-hop switch.

In summary, the present disclosure describes a data-driven intelligentnetworking system that can accommodate dynamic traffic with fast,effective congestion control. The system can maintain state informationof individual packet flows, which can be set up or released dynamicallybased on injected data. A packet flow can be mapped to their layer-2,layer-3, or other protocol-specific header information. Each flow can beprovided with a flow-specific input queue upon arriving at a switch.Packets of a respective flow are acknowledged after reaching the egresspoint of the network, and the acknowledgement packets are sent back tothe ingress point of the flow along the same data path in the reversedirection. As a result, each switch can obtain state information of eachflow and perform flow control of a per-flow basis. Such flow controlallows the network to be better utilized while providing versatiletraffic-engineering and congestion control capabilities.

The methods and processes described above can be performed by hardwarelogic blocks, modules, or apparatus. The hardware logic blocks, modules,or apparatus can include, but are not limited to, application-specificintegrated circuit (ASIC) chips, field-programmable gate arrays (FPGAs),dedicated or shared processors that execute a piece of code at aparticular time, and other programmable-logic devices now known or laterdeveloped. When the hardware logic blocks, modules, or apparatus areactivated, they perform the methods and processes included within them.

The methods and processes described herein can also be embodied as codeor data, which can be stored in a storage device or computer-readablestorage medium. When a processor reads and executes the stored code ordata, the processor can perform these methods and processes.

The foregoing descriptions of embodiments of the present invention havebeen presented for purposes of illustration and description only. Theyare not intended to be exhaustive or to limit the present invention tothe forms disclosed. Accordingly, many modifications and variations willbe apparent to practitioners skilled in the art. Additionally, the abovedisclosure is not intended to limit the present invention. The scope ofthe present invention is defined by the appended claims.

What is claimed is:
 1. A switch, comprising: a storage device to bufferan incoming packet flow, wherein the packet flow corresponds to packetswith one or more common header fields and is identified by an incomingflow identifier that is unique within an input port via which the packetflow is received; and an input flow logic block to maintain stateinformation of the packet flow, and to free the incoming flow identifierin response to determining that all forwarded data of the packet flowhave been acknowledged, thereby allowing the freed flow identifier to beused by another packet flow, wherein determining that all forwarded datahas been acknowledged comprises computing the total downstream packetdata for the packet flow and determining that the total downstreampacket data for the packet flow is zero; wherein the state informationindicates an amount of forwarded but unacknowledged data belonging tothe packet flow; and wherein the input flow logic block is coupled tothe storage device.
 2. The switch of claim 1, wherein the storage devicecomprises a flow-specific queue that is dedicated to the packet flow,thereby allowing forwarding of the packet flow to be controlledindependently from other flows.
 3. The switch of claim 1, wherein theinput flow logic block is further to update the amount of forwarded butunacknowledged data belong to the packet flow based on receivedacknowledgement messages, wherein the acknowledgement messages indicatedelivery of packets belonging to the packet flow to a destination. 4.The switch of claim 1, further comprising: an output flow logic block toupdate a packet belonging to the packet flow with an outgoing flowidentifier, wherein the outgoing flow identifier replaces the incomingflow identifier.
 5. The switch of claim 4, wherein the output flow logicblock is further to perform a lookup for the outgoing flow identifierbased on a match pattern that indicates the incoming flow identifier andthe input port.
 6. The switch of claim 5, wherein, in response to thelookup not resulting in a match, the output flow logic block is furtherto assign a value that is not used for any flow to the outgoing flowidentifier.
 7. The switch of claim 4, wherein, in response todetermining that the switch is a destination for the packet flow, theoutput flow logic block is further to remove a fabric header from apacket belonging to the packet flow, wherein the fabric header includesthe incoming flow identifier.
 8. A switch, comprising: a storage deviceto store packet header information and flow identifiers, wherein arespective flow identifier is unique within an input port and identifiesa packet flow which corresponds to packets with one or more commonheader fields; an edge flow logic block to perform a hardware-basedlookup in the storage device for a flow identifier using a match patternthat includes header information of a received packet, and to create anentry in the storage device that maps the match pattern to a new flowidentifier in response to the lookup not resulting in a match; and aninput queue management logic block to determine when a packet of thepackets with one or more common header fields can be dequeued from aninput queue and sent to a data crossbar switch based on flow-controlparameters stored in the entry.
 9. The switch of claim 8, wherein theedge flow logic block is further to encapsulate the packet with a fabricheader that includes the new flow identifier.
 10. The switch of claim 8,wherein the storage device comprises a ternary content addressablememory (TCAM) or content addressable memory (CAM).
 11. A method,comprising: buffering an incoming packet flow in a storage device,wherein the packet flow corresponds to packets with one or more commonheader fields and is identified by an incoming flow identifier that isunique within an input port via which the packet flow is received;maintaining state information of the packet flow, wherein the stateinformation indicates an amount of forwarded but unacknowledged databelonging to the packet flow; and freeing the incoming flow identifierin response to determining that all forwarded data of the packet flowhave been acknowledged, thereby allowing the freed flow identifier to beused by another packet flow, wherein determining that all forwarded datahas been acknowledged comprises computing the total downstream packetdata for the packet flow and determining that the total downstreampacket data for the packet flow is zero.
 12. The method of claim 11,further comprising providing in the storage device a flow-specific queuethat is dedicated to the packet flow, thereby allowing forwarding of thepacket flow to be controlled independently from other flows.
 13. Themethod of claim 11, further comprising updating the amount of forwardedbut unacknowledged data belong to the packet flow based on receivedacknowledgement messages, wherein the acknowledgement messages indicatedelivery of packets belonging to the packet flow to a destination. 14.The method of claim 11, further comprising updating a packet belongingto the packet flow with an outgoing flow identifier, wherein theoutgoing flow identifier replaces the incoming flow identifier.
 15. Themethod of claim 14, further comprising performing a lookup for theoutgoing flow identifier based on a match pattern that indicates theincoming flow identifier and the input port.
 16. The method of claim 15,further comprising assigning a value that is not used for any flow tothe outgoing flow identifier in response to the lookup not resulting ina match.
 17. The method of claim 14, further comprising removing afabric header from a packet belonging to the packet flow in response todetermining that the switch is a destination for the packet flow,wherein the fabric header includes the incoming flow identifier.
 18. Amethod, comprising: storing in a storage device packet headerinformation and flow identifiers, wherein a respective flow identifieris unique within an input port and identifies a packet flow whichcorresponds to packets with one or more common header fields; performinga hardware-based lookup in the storage device for a flow identifierusing a match pattern that includes header information of a receivedpacket; creating an entry in the storage device that maps the matchpattern to a new flow identifier in response to the lookup not resultingin a match; and determining when a packet of the packets with one ormore common header fields can be dequeued from an input queue and sentto a data crossbar switch based on flow-control parameters stored in theentry.
 19. The method of claim 18, further comprising encapsulating thepacket with a fabric header that includes the new flow identifier. 20.The method of claim 18, wherein creating the entry comprises storing theentry in a ternary content addressable memory (TCAM) or contentaddressable memory (CAM).